home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Prograph Classic 2.6.1 / Prograph Reference Manual / Prograph Reference 1-4 / Prograph Reference 1-4.rsrc / TEXT_155.txt < prev    next >
Encoding:
Text File  |  1995-10-21  |  19.9 KB  |  496 lines

  1.  
  2. t    Window Item Editors*139*
  3.  
  4. There are two kinds of Window Item editors:  a generic WYSIWYG Window Item editor that applies to all subclasses of Window Item, and one Specification editor for each of these classes. 
  5.  
  6. One Window Item editor is invoked for each ¬´Window Item¬ª in the item list of a ¬´Window¬ª when doing WYSIWYG editing of the ¬´Window¬ª. The editable Window Item images appear appropriately placed in the window image of the ¬´Window¬ª.
  7.  
  8. A Specification editor for a ¬´Window Item¬ª can be invoked only by double-clicking a Window Item image, or by a double-click that creates a Window Item image. 
  9.  
  10. _________________________________________________________
  11. NOTE: All editor dialogs are compatible with System 7 and TrueType fonts, allowing you to set the font and size separately. Any size compatible with the fonts in your particular system can be entered in the size field.
  12. ---------------------------------------------------------
  13.  
  14. WYSIWYG Window Item Editor*139*
  15.  
  16. The editing actions that can be performed on Window Item images are as follows:*139*
  17.  
  18. o    A double-click opens the appropriate Specification editor for the ¬´Window Item¬ª.*140*
  19.  
  20. o    A Shift-Option-Command-click opens the Value window for the window item‚Äôs instance (that is, you can directly examine its attributes).
  21.  
  22. o    An Option-double-click opens the Window Item Specification editor, which allows you to change the class of the ¬´Window Item¬ª.
  23.  
  24. o    A click-drag on the bottom right corner resizes the Window Item image. The size is aligned to an 8x8 grid. If the item is created by a click-drag, the drag resizes the newly created item.*140*
  25.  
  26. o    A click-drag elsewhere in the Window Item image repositions it in the window image  The location is aligned to an 8x8 grid.
  27.  
  28. o    An Option-click-drag repositions and resizes without grid restriction.
  29.  
  30. o    A Shift-click-drag restricts the vertical or horizontal repositioning or resizing according to the initial direction of the drag. Again, the result is aligned to an 8x8 grid unless the Option key is also pressed.*140*
  31.  
  32. Resizing a Window Item image or repositioning it in the window image of a ¬´Window¬ª sets the values of the attributes size and location of ¬´Window Item¬ª so that, when the ¬´Window¬ª is activated and displayed on the screen, the pictorial representation of the ¬´Window Item¬ª appears at the same location and is the same size as its image in the window image.
  33.  
  34. When the WYSIWYG Window Item editor is applied to a ¬´Window Item¬ª for which FALSE is the value of the attribute visible?, it appears in the window image of the ¬´Window¬ª in its unselected state as follows:
  35.  
  36.  
  37.  
  38.  
  39.  
  40. In the following description of the Specification editors for ¬´Window Item¬ªs, we describe the unselected appearance of Window Item images corresponding to visible ¬´Window Item¬ªs. We also describe the appearance of each ¬´Window Item¬ª when its ¬´Window¬ª is active. When a Window Item image is selected, it has a gray rectangle with a ‚Äúgrow spot‚Äù at the bottom right corner superimposed on it.
  41.  
  42. Window Item*140*
  43.  
  44. Aside from the usual ways of invoking Specification editors on ¬´Window Item¬ªs, the Window Item Specification editor can also be invoked by an Option-double-click on a Window Item image, regardless of the class of the ¬´Window Item¬ª. This allows the developer to change the class of the ¬´Window Item¬ª.*141*
  45.  
  46. The Window Item Specification editor has a scrolling list displaying the names of all subclasses of Window Item, only one of which can be selected. A selection is made by clicking on a name or typing its first few characters. The selected name specifies the class to which the ¬´Window Item¬ª is converted if the OK button is clicked. *141*
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. The Window Item image appears as follows when editing an instance of this class:*141*
  64.  
  65.  
  66.  
  67.  
  68.  
  69. When the ¬´Window¬ª is active, the instance of Window Item is invisible.
  70.  
  71. Click Item*141*
  72.  
  73.      The Click Item Specification editor has the following items:
  74.  
  75. Click Name, Click Method *141*
  76.  
  77.      Editable-text fields displaying the values of attributes name and click method 
  78.      respectively of ¬´Click Item¬ª
  79.  
  80. Active, Visible, Move w/Window, Grow w/Window *141*
  81.  
  82.      These are checked if and only if the attributes active?, visible?, move?, and 
  83.      grow? respectively, of ¬´Click Item¬ª are TRUE. 
  84.  
  85. Balloon…*141*
  86.  
  87.      Button for opening Balloon Help dialog.*142*
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99. When editing a visible instance of Click Item, its image appears as:*142*
  100.  
  101.  
  102.  
  103.  
  104.  
  105. When the ¬´Window¬ª is active the ¬´Click Item¬ª also has this appearance.
  106.  
  107. Button*142* 
  108.  
  109. The Button Specification editor is exactly analogous to the Click Item Specification editor. *142*
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. When editing a visible instance of Button, its image appears as follows:*142*
  122.  
  123.  
  124.  
  125.                            or        
  126.  
  127.  
  128.  
  129. depending on whether or not the ¬´Button¬ª is the first element of the item list of ¬´Window¬ª (that is, the default button). The text displayed is the value of the attribute name of the ¬´Button¬ª. If the ¬´Button¬ª is inactive, the image is grayed.*142*
  130.  
  131. When the ¬´Window¬ª is active, the ¬´Button¬ª has the same appearance.*143*
  132.  
  133. Radio Set
  134.  
  135. The Radio Set Specification editor is analogous to the Click Item Specification editor, but has an extra editable-text field, Value List, which displays the list of names for the radio buttons in the set. *143*
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150. When editing a visible instance of Radio Set, its image appears as:*143*
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157. The strings displayed to the right of the buttons are the strings in the value list of the ¬´Radio Set¬ª. The selected button is the one whose name is in the value attribute of the ¬´Radio Set¬ª. The radio buttons are displayed in columns within the bounding rectangle of the ¬´Radio Set¬ª. If the ¬´Radio Set¬ª is inactive, the image is grayed.
  158.  
  159. When the ¬´Window¬ª is active, the ¬´Radio Set¬ª has the same appearance.
  160.  
  161. Check Box*143*
  162.  
  163. The Check Box Specification editor is analogous to the Click Item Specification editor, but has an extra check box, Checked, which is checked if and only if the value of attribute checked? of ¬´Check Box¬ª is TRUE. *143*
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176. When editing a visible instance of Check Box, its image appears as:*144*
  177.  
  178.  
  179.  
  180.  
  181. where the text to the right of the box is the value of attribute name of ¬´Check Box¬ª, and the box contains a check mark if and only if the attribute checked? of ¬´Check Box¬ª has value TRUE. If the ¬´Check Box¬ª is inactive, the image is grayed.
  182.  
  183. When the ¬´Window¬ª is active, the ¬´Check Box¬ª has the same appearance.
  184.  
  185. Graphic*144*
  186.  
  187. This class has no Specification editor. The WYSIWYG Window Item editor applied to an instance of Graphic has the same appearance as when applied to an instance of Window Item. 
  188.  
  189. Pict*144*
  190.  
  191. The Pict Specification editor is analogous to the Click Item Specification editor, but has an extra editable-text field, Picture ID #, which displays the value of the attribute rsrc number of the ¬´Pict¬ª. *144*
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. When editing a visible instance of Pict, its image displays the PICT whose resource number is the value of attribute rsrc number of ¬´Pict¬ª. If this number does not correspond with a PICT in the resource fork of the file, the Pict item image displays nothing.*145*
  206.  
  207. When the ¬´Window¬ª is active, the ¬´Pict¬ª also has this appearance.
  208.  
  209. PICTs can be pasted from the Macintosh Clipboard into a selected Pict image. The PICT is saved to the resource fork of the application, with the resource number specified in the Pict specification editor. If the resource number of a pasted PICT is the same as an existing PICT resource in the application‚Äôs resource fork, the new PICT replaces the existing one.*145*
  210.  
  211. When a PICT is pasted into a Pict image, the Pict image is resized to the size of the PICT in the Clipboard.
  212.  
  213. When a PICT is cut or cleared from a Pict image, the PICT is not removed from the application‚Äôs resource fork; rather, a new, unique resource number is assigned to the ¬´Pict¬ª.
  214.  
  215. Icon*145*
  216.  
  217. The Icon Specification editor is analogous to the Click Item Specification editor, but has an extra editable-text field, Icon ID #, which displays the value of the attribute rsrc number of the ¬´Icon¬ª. *145*
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231. *145*When editing a visible instance of Icon, its image displays the ICON whose resource number is the value of attribute rsrc number of ¬´Icon¬ª. If this number does not correspond with an ICON in the resource fork of the file, the Icon item image shows nothing.
  232.  
  233. When the ¬´Window¬ª is active, the ¬´Icon¬ª also has this appearance.*145*
  234.  
  235. *146*ICONs can be pasted from the Macintosh Clipboard into a selected Icon image. The ICON is saved to the resource fork of the application, with the resource number specified in the Icon specification editor. If the resource number of a pasted ICON is the same as that of an existing ICON resource in the application‚Äôs resource fork, the new ICON replaces the existing one.
  236.  
  237. When an ICON is pasted into an Icon image, the ¬´Icon¬ª is resized to a 32x32 square, the standard size of a Macintosh ICON.
  238.  
  239. When an ICON is cut or cleared from an Icon image, the ICON is not removed from the application‚Äôs resource fork; rather, a new, unique resource number is assigned to the ¬´Icon¬ª.*146*
  240.  
  241. _________________________________________________________
  242. NOTE:  The Scrapbook can be used for intermediate storage of ICONs. (ICONs are not visible when stored in the Scrapbook.)
  243. ---------------------------------------------------------
  244.  
  245. Text*146*
  246.  
  247. The Text, Edit Text, and Scroll Text editors all use the same editor dialog. However, the attributes you can set change depending on the type of item you‚Äôre creating. For example, Edit Text has Wrap and Active options; these are not available in the Text editor. The Text editor allows you to create ‚ÄúRead-only‚Äù text fields.*146*
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267. The following table defines the fields and various attributes associated with the Text, Edit Text, and Scroll Text editor dialogs.*147*
  268.  
  269. Name*147* 
  270.           This is the name that is used to identify the text item. It can be any length and usually indicates something about the contents of the text item. The name you enter is used by the primitive find-item to locate the text item in your program. Therefore, avoid using mathematical symbols or quotes in the name as these characters can cause problems if and when you attempt to use the text item name in your code.    
  271.  
  272. Text*147* 
  273.           This is where you enter ‚Äúdefault‚Äù text (text that is automatically displayed in your text item). The only limitation is that the amount of memory used to store the text cannot exceed 32K. The text you enter will automatically scroll if you exceed the limits of this field‚Äôs length. If you want to add a carriage return in the default text, you must hold down the Option key and press Return when you come to the end of a text string. To move the cursor within this field, use the arrow keys on your keyboard.    
  274.  
  275. Font*147* 
  276.           This is a scrolling list of all available fonts in your system.     
  277.  
  278. Size*147* 
  279.           Enter the font size. The default value of 0 means that no size has been entered, and Prograph will use the system default font size for the field‚Äôs font size.    
  280.  
  281. Bold, Italic, Underline, Outline, Shadow*147* 
  282.           Click the associated check box to assign one or more of the available styles.     
  283.  
  284. Left, Center, Right*147*    
  285.           Click one of the associated radio buttons to set the field‚Äôs alignment. These attributes are grayed out and are not available if you are creating a Scroll Text field.    
  286.  
  287. Active*147* 
  288.           If a text item is active, its text can be edited at runtime, including the default text previously entered in the Text field. If the text item is inactive, text cannot be entered and the default text can not be edited unless you return to this Text editor dialog.    
  289.  
  290. Visible*147*    
  291.           If you uncheck this attribute, the text item and any default text will not be visible. The default is visible (checked).    
  292.  
  293. Border*148*    
  294.           Check if you want a 1 point border drawn around the text item. Uncheck if the text item is to be used as a title or other static text.    
  295.  
  296. Move w/Window*148*    
  297.           When you check this attribute, the text item remains the same size but the top/left corner of the text item moves in relation to the size of the window. You would check this attribute when building a program that will run on several different size monitors and you have set the window to be the same size as the monitor.    
  298.  
  299. Grow w/Window*148*    
  300.           Check this attribute when you want the text item size to change when you change the window size. If both Move w/Window and Grow w/Window are checked, the text item will change proportionately to the size of the window.    
  301.  
  302. Wrap*148* 
  303.           Check this attribute when you want the text to wrap within the confines of the defined text item. Checking this option in the Scroll Text editor window removes the horizontal scroll bar.    
  304.  
  305. When editing a visible instance of Text, the string displayed is the value of the Text attribute of the ¬´text¬ª using the font, point size, and style specified by the attributes font, font size, and font style. The string is justified in the bounding rectangle of ¬´text¬ª according to the value of the attribute justification, and is wrapped to fit into the bounding rectangle. The bounding rectangle is drawn in gray.*148*
  306.  
  307. When the ¬´Window¬ª is active, the ¬´Text¬ª also has this appearance, except that the bounding rectangle is not drawn.
  308.  
  309. Edit Text*148*
  310.  
  311. The Edit Text Specification editor is identical to the Text Specification editor, except that the check boxes Active and Wrap are available. These boxes are checked if and only if the attributes active? and wrap? respectively of ¬´Edit Text¬ª are TRUE. 
  312.  
  313. When editing a visible instance of Edit Text, the string displayed is the value of the text attribute of the ¬´Edit Text¬ª in the same way as for an instance of Text, except that the bounding rectangle is drawn black and the string is wrapped to fit the bounding rectangle only if the wrap? attribute has value TRUE. For example:
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320. When the ¬´Window¬ª is active, the ¬´Edit Text¬ª also has this appearance, but if the ¬´Edit Text¬ª is active, it can also be edited.*149*
  321.  
  322. Scroll Text*149*
  323.  
  324. The Scroll Text Specification editor is identical to the Edit Text Specification editor. 
  325.  
  326. When editing a visible instance of Scroll Text, the string displayed is the value of the text attribute of the ¬´Edit Text¬ª in the same way as for an instance of Edit Text, except that the bounding rectangle has both vertical and horizontal scroll bars. For example:*149*
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. When the ¬´Window¬ª is active, the ¬´Scroll Text¬ª also has this appearance, but if the ¬´Scroll Text¬ª is active, it can be edited.
  335.  
  336. Styled Text in Prograph Classic*149*
  337.  
  338. All Edit Text and Scroll Text window items are created with ‚Äústyle-aware‚Äù edit records. This means your applications can include the ability to change the font, style or size of individual pieces of text within an item. Mac toolbox calls in your code must be used to accomplish this functionality, but there are ‚Äúcanned‚Äù Font, Style and Size menus in an example file on the distribution disk, so you can just ‚Äúplug them in and go.‚Äù
  339.  
  340. You set the default font, size and style with the dialog in the Application Builder. If you don‚Äôt put any style changing code in your application, Edit Text and Scroll Text items will have text with font, size and style set to those defaults. In this case, setting the font, font size, or font style attributes at runtime will change settings for all the text in the item. *149*
  341.  
  342. However, if multiple fonts, styles or sizes exist in the text, setting those attributes will have the following effect:  only runs of text that have the old value of the attribute will be changed to use the new value. For example, if an item has a font size attribute with value 10, and there is 10, 12 and 14 point text in the item, setting the font size attribute to 18 will affect only the 10 point text‚Äîthe 12 and 14 point text will be unchanged.*150*
  343.  
  344. A new attribute, style record, has been added to the Edit Text class and is inherited by Scroll Text. Prograph uses this attribute to automatically save information about style changes within the item‚Äôs text. The attribute is set to NULL if one font, size and style is used throughout.
  345.  
  346. Setting the text attribute will cause the saved style record information to be set to NULL, and the default settings from the font, font size, and font style attributes will be applied to all of the new text.
  347.  
  348. Scroll List*150*
  349.  
  350. The Scroll List Specification editor is analogous to the Click Item Specification editor, but has an extra editable-text field, List of Values, which displays the list of strings that is the value of the attribute value list. It also supports your choice of font, size, and style for the scroll list items, and lets you specify whether the user is restricted to selecting just one item from the scroll list, or whether multiple selection is allowed.*150*
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379. *150*When editing a visible instance of Scroll List, the Scroll List image displays the list of strings that is the value of the value list attribute of the ¬´Scroll List¬ª. The strings are displayed in a rectangle from top to bottom in the order in which they occur in value list. If the ¬´Scroll List¬ª is active, the rectangle has a vertical scroll bar. For example:*151*
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388. *151*When the ¬´Window¬ª is active, the ¬´Scroll List¬ª also has this appearance, but some of the displayed strings can also be selected.
  389.  
  390. Canvas*151*
  391.  
  392. The Canvas Specification editor displays the following items. 
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.      Item Name, Click Method, Draw Method*151*
  418.  
  419.           Editable-text fields that display the values of the attributes name, click 
  420.                method, and draw method, respectively of ¬´Canvas¬ª. 
  421.  
  422. Item Limits*151*
  423.  
  424.      Four editable-text fields, Top, Left, Bottom, and Right, which together display the 
  425.      value of the attribute limits of the ¬´Canvas¬ª. The limits value is a rectangle 
  426.      defining the area over which the top left corner of the canvas can range, and thus, 
  427.      together with the size attribute of the ¬´Canvas¬ª, defines the size of the drawing 
  428.      area onto which the ¬´Canvas¬ª provides a view.
  429.  
  430. Vertical Scroll Bar, Horizontal Scroll Bar*151*
  431.  
  432.      These boxes are checked if the attributes vScroll? and hScroll?, respectively, 
  433.           of ¬´Canvas¬ª are TRUE.
  434.  
  435. Border*152*
  436.  
  437.      If checked,  a 1 point border is drawn around the edges of the canvas.
  438.  
  439. Active, Visible, Move w/Window, Grow w/Window*152*
  440.  
  441.      These boxes are checked if and only if the attributes active?, visible?, move?, 
  442.           and grow?, respectively, of ¬´Canvas¬ª are set to TRUE.
  443.  
  444. Balloon…*152*
  445.  
  446.      Button for opening Balloon Help dialog.
  447.  
  448. When editing a visible instance of Canvas, the Canvas image appears as follows, although the scroll bars are drawn as active if the ¬´Canvas¬ª drawing rectangle is smaller than the drawing area as defined in the description of Item Limits above.*152*
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460. When the ¬´Window¬ª is active, the ¬´Canvas¬ª also has this appearance, except that the ¬´Canvas¬ª rectangle can also contain graphics generated by the method specified in the attribute draw method. *152*
  461.  
  462. Pop-up Menu*153*
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485. Value List is a list of strings for the pop-up‚Äôs menu item names. If, for example, you enter a list of numbers, Prograph will beep, and you will not be able to hit OK until you have changed the list to a list of strings.
  486.  
  487. If you want a title for your pop-up menu, leave the default setting checked. However, if you want just the pop-up menu, without a separate title, displayed, then uncheck the Title? option.*153*
  488.  
  489. If the Fixed Size option is checked, the pop-up menu always extends to the right edge of the pop-up menu item. If the contents of the menu do not fit in the provided space, the text is truncated to fit. If the Fixed Size option is unchecked, the pop-up menu will automatically adjust its size to fit the longest item in the menu. The default setting is ‚Äúunchecked‚Äù for this option.
  490.  
  491. The font attributes only apply to the menu‚Äôs title.
  492.  
  493. The Click Method is the method that is executed when selecting a menu item.*153*
  494.  
  495.  
  496.